import { message } from 'antd';
import { router } from 'umi';
import {
  getRemitPageList,
  getClaimPageList,
  getUpdateList,
  getRemitDetail,
  getClaimDetail,
  getClaimCancel,
  getProcessInfor,
  getClmAdjustBill,
  getBalanceAval,
  getInsert,
  getQueryBusiParam,
  getSupplyList,
} from '@/services/remitclaim';
import { getServiceType } from '@/services/api';

export default {
  state: {
    activeKey: '1',
    formFieldsValue: {},
    claimFormFieldsValue: {},
    remitExpandForm: false,
    claimExpandForm: false,
    pageData: {
      list: [],
      pagination: {
        current: 1,
        pageSize: 10,
        total: 0,
      },
    },
    pageDataStep: {
      list: [],
      pagination: {
        current: 1,
        pageSize: 10,
        total: 0,
      },
    },
    pageDataModal: {
      list: [],
    },
    payApplySubmitData: {
      firstStep: {},
    },
    searchListDataSource: {
      supplierList: [], // 供应商
      serType_List: [],
    },
    remitClaimPageData: { pageList: [] },
    claimTypeId: null,
    radioValue: true,
    remitDetail: { clmRcrdList: [], clmRemit: {} },
    claimDetail: { remitList: [], dataRcrdsList: [], diffRcrdList: [] },
    processInfor: { remitList: [], dataRcrdsList: [], clmDiffRcrds: [] },
  },

  effects: {
    *fetchRemitPageList({ payload }, { call, put }) {
      const response = yield call(getRemitPageList, payload); // 请求
      const {
        pageArg: { currentPage, pageSize },
      } = payload;
      if (response.success) {
        yield put({
          type: 'getPageList', // 处理后台返回数据
          payload: { data: response.data, currentPage, pageSize },
        });
      } else {
        message.warning(response.message || '服务端错误');
      }
    },
    *fetchClaimPageList({ payload }, { call, put, select }) {
      const { userType } = yield select(state => state.remitclaim);
      let newClmType = null;
      let feeType = null;
      if (+userType === 4) {
        if (+payload.clmType === 4) {
          newClmType = 4;
          feeType = 4;
        }
        if (+payload.clmType === 5) {
          newClmType = 4;
          feeType = 5;
        }
      }
      if (+userType === 1) {
        if (+payload.clmType === 3) {
          feeType = 3;
          newClmType = 3;
        } else {
          newClmType = payload.clmType;
        }
      }
      if (+userType === 2) {
        if (+payload.clmType === 5) {
          feeType = 4;
          newClmType = payload.clmType;
        } else {
          newClmType = payload.clmType;
        }
      }
      const response = yield call(getClaimPageList, { ...payload, feeType, clmType: newClmType }); // 请求
      const {
        pageArg: { currentPage, pageSize },
      } = payload;
      if (response.success) {
        yield put({
          type: 'getPageList', // 处理后台返回数据
          payload: {
            data: response.data,
            currentPage,
            pageSize,
          },
        });
      } else {
        message.warning(response.message || '服务端错误');
      }
    },
    *fetchUpdateList({ payload }, { call, put, select }) {
      const { claimTypeId, radioValue } = yield select(state => state.remitclaim);
      let values;
      const claimTypeIdInt = Number(claimTypeId);
      if ((claimTypeIdInt === 4 && radioValue) || claimTypeIdInt === 5) {
        values = {
          insRefundInfoVo: {
            ...payload.tempVal,
            dataType: claimTypeIdInt === 5 ? 1 : undefined,
          },
          pageArg: payload.pageArg,
        };
      } else if (claimTypeIdInt === 4 && !radioValue) {
        values = {
          accuRefundInfoVo: {
            ...payload.tempVal,
          },
          pageArg: payload.pageArg,
        };
      } else {
        values = { ...payload.tempVal, pageArg: payload.pageArg };
      }
      const response = yield call(getUpdateList, values, claimTypeId, radioValue); // 请求
      const {
        pageArg: { currentPage, pageSize },
      } = payload;
      if (response.success) {
        yield put({
          type: 'getPageListStep', // 处理后台返回数据
          payload: {
            data: response.data,
            currentPage,
            pageSize,
          },
        });
      } else {
        message.warning(response.message || '服务端错误');
      }
    },
    // 汇款详情
    *fetchRemitDetail({ payload }, { call, put }) {
      const response = yield call(getRemitDetail, payload);
      if (response.success) {
        yield put({
          type: 'getRemitDetail',
          payload: response.data,
        });
      } else {
        message.warning(response.message || '服务端错误');
      }
    },
    // 认领详情
    *fetchClaimDetail({ payload }, { call, put }) {
      const response = yield call(getClaimDetail, payload);
      if (response.success) {
        yield put({
          type: 'getClaimDetail',
          payload: response.data,
        });
        yield put({
          type: 'initialPageData',
          payload: response.data.clmType,
        });
      } else {
        message.warning(response.message || '服务端错误');
      }
    },
    *fetchClaimCancel({ payload }, { call }) {
      const response = yield call(getClaimCancel, payload);
      if (response.success) {
        router.goBack();
      } else {
        message.warning(response.message || '服务端错误');
      }
    },
    *fetchProcessInfor({ payload }, { call, put, select }) {
      const {
        userType,
        claimTypeId,
        payApplySubmitData: {
          firstStep: { feeType },
        },
      } = yield select(state => state.remitclaim);
      const response = yield call(getProcessInfor, {
        ...payload,
        clmType: claimTypeId,
        feeType: Number(userType) === 3 ? undefined : feeType,
      });
      if (response.success) {
        yield put({
          type: 'getProcessInfor',
          payload: response.data,
        });
      }
      return response;
    },
    *fetchBalanceAval({ payload }, { call, put, select }) {
      const { claimTypeId } = yield select(state => state.remitclaim);
      const response = yield call(getBalanceAval, {
        ...payload,
        clmType: claimTypeId,
      });
      if (response.success) {
        yield put({
          type: 'updateModelData',
          payload: { acctBalanceAval: response.data.acctBalanceAval },
        });
      } else {
        message.warning(response.message || '服务端错误');
      }
    },
    *fetchQueryBusiParam({ payload }, { call, put }) {
      const response = yield call(getQueryBusiParam, {
        ...payload,
      });
      if (response.success) {
        yield put({
          type: 'updateModelData',
          payload: { billAdjAmoUprLmt: response.data.billAdjAmoUprLmt },
        });
      } else {
        message.warning(response.message || '服务端错误');
      }
    },
    *fetchInsert({ payload }, { call, select }) {
      const {
        claimTypeId,
        payApplySubmitData: {
          firstStep: { feeType },
        },
      } = yield select(state => state.remitclaim);
      const response = yield call(getInsert, { ...payload, clmType: claimTypeId, feeType });
      if (response.success) {
        return response;
      }
      return message.warning(response.message || '服务端错误');
    },
    *fetchClmAdjustBill({ payload }, { call, put, select }) {
      const {
        claimTypeId,
        payApplySubmitData: {
          firstStep: { feeType },
        },
      } = yield select(state => state.remitclaim);
      const response = yield call(getClmAdjustBill, { ...payload, clmType: claimTypeId, feeType });
      if (response.success) {
        yield put({
          type: 'getPageListModal', // 处理后台返回数据
          payload: response.data,
        });
      } else {
        message.warning(response.message || '服务端错误');
      }
    },
    *fetchServiceType({ payload }, { call, put }) {
      const response = yield call(getServiceType, payload);
      if (response.success) {
        yield put({
          type: 'getServiceType', // 处理后台返回数据
          payload: response.data,
        });
      } else {
        message.warning(response.message || '服务端错误');
      }
    },
    *fetchSupplyList({ payload }, { call, put }) {
      const response = yield call(getSupplyList, payload);
      if (response.success) {
        yield put({
          type: 'getSupplyList', // 处理后台返回数据
          payload: response.data,
        });
      } else {
        message.warning(response.message || '服务端错误');
      }
    },
  },

  reducers: {
    getPageList(
      state,
      {
        payload: { data, currentPage, pageSize },
      }
    ) {
      const list = Array.isArray(data.pageRecords) ? data.pageRecords : [];
      return {
        ...state,
        pageData: {
          list,
          pagination: { total: data.totalCount, current: currentPage, pageSize },
        },
      };
    },
    getPageListStep(
      state,
      {
        payload: { data, currentPage, pageSize },
      }
    ) {
      const list = Array.isArray(data.pageRecords) ? data.pageRecords : [];
      return {
        ...state,
        pageDataStep: {
          list,
          pagination: { total: data.totalCount, current: currentPage, pageSize },
        },
      };
    },
    getPageListModal(state, { payload }) {
      const list = Array.isArray(payload) ? payload : [];
      return {
        ...state,
        pageDataModal: {
          list,
        },
      };
    },
    getRemitDetail(state, { payload }) {
      return {
        ...state,
        remitDetail: { ...state.remitDetail, ...payload },
      };
    },
    getClaimDetail(state, { payload }) {
      return {
        ...state,
        claimDetail: { ...state.claimDetail, ...payload },
      };
    },
    getProcessInfor(state, { payload }) {
      return {
        ...state,
        processInfor: { ...state.processInfor, ...payload },
      };
    },
    getServiceType(state, { payload }) {
      return {
        ...state,
        searchListDataSource: {
          ...state.searchListDataSource,
          serType_List: payload,
        },
      };
    },
    getSupplyList(state, { payload }) {
      return {
        ...state,
        searchListDataSource: {
          ...state.searchListDataSource,
          supplierList: payload,
        },
      };
    },

    initialPageData(state, { payload }) {
      // * 列表中的button，对应的值和系统
      // 1.认领客户到款 2.供应商3.员工--客服系统：
      // 4 --运行系统
      // 5.接单 6.签约--全国系统
      // * 每个button对应的页面中不同Radio，显示不同的table
      // columns11：columns+按钮值+费用类型值
      const columns11 = [
        // 客户账单
        { label: '编号', prop: 'billNo' },
        { label: '客户名称', prop: 'custName' },
        { label: '成本中心', prop: 'costCenterName' },
        { label: '账单年月', prop: 'billYmStr', location: 'center', type: 'mouth' },
        { label: '账单金额（元）', prop: 'billAmo', location: 'right', width: 180 },
        { label: '操作', prop: 'operation', type: 'jumpRoutingCs', location: 'center', width: 80 },
      ];
      const columns12 = [
        { label: '编号', prop: 'onceFeeNo' },
        { label: '客户名称', prop: 'custName' },
        { label: '产品名称', prop: 'pdName' },
        { label: '业务年月', prop: 'busiYmLong', type: 'mouth', location: 'center' },
        { label: '收费总金额（元）', prop: 'feeAmo', location: 'right', width: 180 },
      ];
      // 供应商账单
      const columns21 = [
        { label: '编号', prop: 'billNo' },
        { label: '供应商名称', prop: 'sendSuppName' },
        { label: '账单年月', prop: 'billYmStr', type: 'mouth', location: 'center' },
        { label: '账单金额（元）', prop: 'billAmo', location: 'right' },
        { label: '操作', prop: 'operation', type: 'jumpRoutingCs', location: 'center', width: 80 },
      ];
      const columns22 = [
        { label: '编号', prop: 'onceFeeSuppOfflNo' },
        { label: '供应商名称', prop: 'sendSuppName' },
        { label: '产品名称', prop: 'pdName' },
        { label: '业务年月', prop: 'busiYmLong', type: 'mouth', location: 'center' },
        { label: '收费总金额（元）', prop: 'feeAmo', location: 'right', width: 180 },
      ];
      // 雇员
      const columns33 = [
        { label: '编号', prop: 'onceFeeNo' },
        { label: '姓名', prop: 'empName' },
        { label: '证件号', prop: 'idNo' },
        { label: '产品名称', prop: 'pdName' },
        { label: '业务年月', prop: 'busiYmLong', type: 'mouth', location: 'center' },
        { label: '收费总金额(元)', prop: 'feeAmo', location: 'right', width: 180 },
      ];
      // 社保返款
      const columns44 = [
        { label: '客户名称', prop: 'custName' },
        { label: '姓名', prop: 'empName' },
        { label: '证件号', prop: 'certNo' },
        { label: '地区', prop: 'areaName' },
        { label: '服务类型', prop: 'serTypeIdName', location: 'center' },
        { label: '返款时间', prop: 'creTime', type: 'date', location: 'center' },
        { label: '本次返款金额(元)', prop: 'refundAmt', location: 'right' },
      ];
      const columns45 = [
        { label: '客户名称', prop: 'custName' },
        { label: '姓名', prop: 'empName' },
        { label: '证件号', prop: 'certNo' },
        { label: '地区', prop: 'areaName' },
        { label: '服务类型', prop: 'serTypeIdName', location: 'center' },
        { label: '返款时间', prop: 'creTime', type: 'date', location: 'center' },
        { label: '本次返款金额(元)', prop: 'refundAmt', location: 'right' },
      ];

      const columns54 = [
        { label: '接单方名称', prop: 'ordRecvName' },
        { label: '姓名', prop: 'empName' },
        { label: '证件号', prop: 'certNo' },
        { label: '服务类型', prop: 'serTypeIdName', location: 'center' },
        { label: '返款时间', prop: 'creTime', location: 'center', type: 'date' },
        { label: '本次返款金额(元)', prop: 'refundAmt', location: 'right' },
      ];
      // 账单
      const columns61 = [
        { label: '编号', prop: 'billNo' },
        { label: '签约方名称', prop: 'recvSuppIdName' },
        { label: '账单年月', prop: 'billYm', location: 'center', type: 'mouth' },
        { label: '账单金额', prop: 'billAmo', location: 'right' },
        { label: '操作', prop: 'operation', type: 'jumpRoutingNs', location: 'center', width: 80 },
      ];
      const columns62 = [
        { label: '编号', prop: 'onceFeeChrgNo' },
        { label: '签约方名称', prop: 'ordSndrName' },
        { label: '产品名称', prop: 'pdName' },
        { label: '业务年月', prop: 'busiYmLong', location: 'center', type: 'mouth' },
        { label: '收费总金额（元）', prop: 'feeAmo', location: 'right' },
      ];

      const firstStep = new Array(7);
      // 客户账单
      firstStep[1] = {
        title: '选择账单',
        tip: '（说明：选择汇款单对应的账单或一次性费用）',
        detailTitle: '账单信息',
        progressTitle: '已选账单信息',
        searchList11: [
          {
            label: '费用类型',
            prop: 'feeType',
            type: 'radio',
            dataSource: [
              { itemCode: '1', itemName: '客户账单' },
              { itemCode: '2', itemName: '一次性费用' },
            ],
          },
          { label: '客户名称', prop: 'custId', type: 'searchCs' },
          { label: '账单年月', prop: 'dateArr', type: 'date' },
        ],
        searchList12: [
          {
            label: '费用类型',
            prop: 'feeType',
            type: 'radio',
            dataSource: [
              { itemCode: '1', itemName: '客户账单' },
              { itemCode: '2', itemName: '一次性费用' },
            ],
          },
          { label: '客户名称', prop: 'custId', type: 'searchCs' },
          { label: '业务年月', prop: 'dateArr', type: 'date' },
        ],
        columns: { columns11, rowkey11: 'billId', columns12, rowkey12: 'onceFeeId' },
        feeType: '1',
      };
      firstStep[2] = {
        title: '选择账单',
        tip: '（说明：选择汇款单对应的账单或一次性费用）',
        detailTitle: '账单信息',
        progressTitle: '已选账单信息',
        searchList21: [
          {
            label: '费用类型',
            prop: 'feeType',
            type: 'radio',
            dataSource: [
              { itemCode: '1', itemName: '供应商账单' },
              { itemCode: '2', itemName: '一次性费用' },
            ],
          },
          {
            label: '供应商名称',
            prop: 'sendSuppId',
            type: 'select',
            dataSource: 'supplierList',
            id: 'suppId',
            name: 'name',
          },
          { label: '账单年月', prop: 'dateArr', type: 'date' },
        ],
        searchList22: [
          {
            label: '费用类型',
            prop: 'feeType',
            type: 'radio',
            dataSource: [
              { itemCode: '1', itemName: '供应商账单' },
              { itemCode: '2', itemName: '一次性费用' },
            ],
          },
          {
            label: '供应商名称',
            prop: 'sendSuppId',
            type: 'select',
            dataSource: 'supplierList',
            id: 'suppId',
            name: 'name',
          },
          { label: '账单年月', prop: 'dateArr', type: 'date' },
        ],
        columns: { columns21, rowkey21: 'billId', columns22, rowkey22: 'onceFeeId' },
        feeType: '1',
      };
      firstStep[3] = {
        title: '选择账单',
        tip: '（说明：选择汇款单对应的账单或一次性费用）',
        detailTitle: '账单信息',
        progressTitle: '已选账单信息',
        searchList33: [
          { label: '姓名', prop: 'empName', type: 'input' },
          { label: '业务年月', prop: 'dateArr', type: 'date' },
        ],
        columns: { columns33, rowkey33: 'onceFeeId' },
        feeType: '3',
      };
      firstStep[4] = {
        title: '选择返款信息',
        tip: '（说明：选择员工业务返款数据）',
        detailTitle: '返款信息',
        progressTitle: '已选返款信息',
        searchList44: [
          {
            label: '返款类型',
            prop: 'feeType',
            type: 'radio',
            dataSource: [
              { itemCode: '4', itemName: '社保返款' },
              { itemCode: '5', itemName: '公积金返款' },
            ],
          },
          { label: '姓名', prop: 'empName', type: 'input' },
          { label: '返款时间', prop: 'dateArr', type: 'dateTime' },
          { label: '客户名称', prop: 'custId', type: 'searchOs' },
        ],
        searchList45: [
          {
            label: '返款类型',
            prop: 'feeType',
            type: 'radio',
            dataSource: [
              { itemCode: '4', itemName: '社保返款' },
              { itemCode: '5', itemName: '公积金返款' },
            ],
          },
          { label: '姓名', prop: 'empName', type: 'input' },
          { label: '返款时间', prop: 'dateArr', type: 'dateTime' },
          { label: '客户名称', prop: 'custId', type: 'searchOs' },
        ],
        columns: { columns44, rowkey44: 'refundInfoId', columns45, rowkey45: 'refundInfoId' },
        feeType: '4',
      };
      firstStep[5] = {
        title: '选择返款信息',
        tip: '（说明：选择员工业务返款数据）',
        detailTitle: '返款信息',
        progressTitle: '已选择返款信息',
        searchList54: [
          { label: '接单方名称', prop: 'sendSuppId', type: 'NsSupplier' },
          { label: '姓名', prop: 'empName', type: 'input' },
          { label: '返款时间', prop: 'dateArr', type: 'dateTime' },
        ],
        columns: { columns54, rowkey54: 'refundInfoId' },
        feeType: '4',
      };
      // Ns
      firstStep[6] = {
        title: '选择账单',
        tip: '（说明：选择汇款单对应的账单或一次性费用）',
        detailTitle: '账单信息',
        progressTitle: '已选账单信息',
        searchList61: [
          {
            label: '费用类型',
            prop: 'feeType',
            type: 'radio',
            dataSource: [
              { itemCode: '1', itemName: '账单' },
              { itemCode: '2', itemName: '一次性费用' },
            ],
          },
          { label: '签约方名称', prop: 'ordRecvId', type: 'NsSupplier' },
          { label: '账单年月', prop: 'dateArr', type: 'date' },
        ],
        searchList62: [
          {
            label: '费用类型',
            prop: 'feeType',
            type: 'radio',
            dataSource: [
              { itemCode: '1', itemName: '账单' },
              { itemCode: '2', itemName: '一次性费用' },
            ],
          },
          { label: '签约方名称', prop: 'ordRecvId', type: 'NsSupplier' },
          { label: '业务年月', prop: 'dateArr', type: 'date' },
        ],
        columns: { columns61, rowkey61: 'billId', columns62, rowkey62: 'onceFeeChrgId' },
        feeType: '1',
      };
      return {
        ...state,
        payApplySubmitData: {
          firstStep: firstStep[payload],
        },
      };
    },

    updateFeeType(state, { payload }) {
      const newState = state;
      newState.payApplySubmitData.firstStep.feeType = payload;
      return {
        ...state,
      };
    },

    // 初始化列表-认领，根据sysCode(useType)判断
    initialPageListData(state, { payload }) {
      const pageList = new Array(7);
      //  客服
      const columns1 = [
        { label: '客户名称', prop: 'beClmName', isShow: '1' },
        { label: '供应商名称', prop: 'beClmName', isShow: '2' },
        { label: '姓名', prop: 'beClmName', isShow: '3' },
        { label: '证件号', prop: 'beCardNo', isShow: '3' },
        { label: '认领金额（元）', prop: 'clmAmo', location: 'right' },
        { label: '结算状态', prop: 'settStateName', location: 'center' },
        { label: '认领类型', prop: 'clmTypeName', location: 'center' },
        { label: '认领人员', prop: 'creName' },
        { label: '认领时间', prop: 'creTime', location: 'center', type: 'date' },
        { label: '操作', prop: 'operation', type: 'jumpRouting', location: 'center', width: 120 },
      ];
      pageList[1] = {
        searchList: [
          { label: '客户名称', prop: 'beClmIdCust', type: 'searchCs', isShow: '1' },
          {
            label: '供应商名称',
            prop: 'beClmIdSupp',
            type: 'select',
            isShow: '2',
            dataSource: 'supplierList',
            id: 'suppId',
            name: 'name',
          },
          { label: '姓名', prop: 'beClmIdName', type: 'input', isShow: '3' },
          { label: '认领时间', prop: 'dateArr', type: 'date' },
        ],
        typeDataSoure: [
          { itemCode: '1', itemName: '客户缴费' },
          { itemCode: '2', itemName: '供应商缴费' },
          { itemCode: '3', itemName: '员工缴费' },
        ],
        columns: columns1,
      };
      //  全国
      const columns2 = [
        { label: '签约方名称', prop: 'beClmName', isShow: '6' },
        { label: '姓名', prop: 'beClmName', isShow: '5' },
        { label: '证件号', prop: 'beCardNo', isShow: '5' },
        { label: '认领金额（元）', prop: 'clmAmo', location: 'right' },
        { label: '结算状态', prop: 'settStateName', location: 'center' },
        { label: '认领类型', prop: 'clmTypeName', location: 'center' },
        { label: '认领人员', prop: 'creName' },
        { label: '认领时间', prop: 'creTime', location: 'center', type: 'date' },
        { label: '操作', prop: 'operation', type: 'jumpRouting', location: 'center', width: 120 },
      ];
      pageList[2] = {
        searchList: [
          {
            label: '签约方名称',
            prop: 'beClmIdNs',
            type: 'NsSupplier',
            isShow: '6',
          },
          { label: '姓名', prop: 'beClmIdName', type: 'input', isShow: '5' },
          { label: '认领时间', prop: 'dateArr', type: 'date' },
        ],
        typeDataSoure: [
          { itemCode: '6', itemName: '签约方费用' },
          { itemCode: '5', itemName: '接单方返款' },
        ],
        columns: columns2,
      };
      //  员工
      const columns3 = [
        { label: '姓名', prop: 'beClmName', isShow: '3' },
        { label: '证件号', prop: 'beCardNo', isShow: '3' },
        { label: '认领金额（元）', prop: 'clmAmo', location: 'right' },
        { label: '结算状态', prop: 'settStateName', location: 'center' },
        { label: '认领类型', prop: 'clmTypeName', location: 'center' },
        { label: '认领人员', prop: 'creName' },
        { label: '认领时间', prop: 'creTime', location: 'center', type: 'date' },
        { label: '操作', prop: 'operation', type: 'jumpRouting', location: 'center', width: 120 },
      ];
      pageList[3] = {
        searchList: [
          { label: '姓名', prop: 'beClmIdName', type: 'input', isShow: '3' },
          { label: '认领时间', prop: 'dateArr', type: 'date' },
        ],
        typeDataSoure: [{ itemCode: '3', itemName: '员工缴费' }],
        columns: columns3,
      };
      //  运行
      const columns4 = [
        { label: '姓名', prop: 'beClmName' },
        { label: '证件号', prop: 'beCardNo' },
        { label: '认领金额（元）', prop: 'clmAmo', location: 'right' },
        { label: '结算状态', prop: 'settStareName', location: 'center' },
        { label: '服务类型', prop: 'serTypeName', location: 'center' },
        { label: '认领人员', prop: 'creName' },
        { label: '认领时间', prop: 'creTime', location: 'center', type: 'date' },
        { label: '操作', prop: 'operation', type: 'jumpRouting', location: 'center', width: 120 },
      ];
      pageList[4] = {
        searchList: [
          { label: '姓名', prop: 'beClmIdName', type: 'input' },
          {
            label: '服务类型',
            prop: 'serTypeId',
            type: 'select',
            dataSource: 'serType_List',
            id: 'serTypeId',
            name: 'serTypeIdName',
          },
        ],
        typeDataSoure: [
          { itemCode: '4', itemName: '社保返款' },
          { itemCode: '5', itemName: '公积金返款' },
        ],
        columns: columns4,
      };
      return {
        ...state,
        remitClaimPageData: {
          pageList: pageList[payload],
        },
      };
    },

    updateModelData(state, { payload }) {
      return {
        ...state,
        ...payload,
      };
    },
  },
};
